package com.example.meterialproject.bean;

import android.graphics.drawable.Drawable;
import android.net.Uri;

import com.pchmn.materialchips.model.ChipInterface;

public class ChipBean implements ChipInterface {

    public int id;  // id
    public Drawable peopleImage; // 本地照片
    public String peopleName; // title
    public String peopleInfo;   // subtitle
    public Uri uri = Uri.parse("https://robohash.org/1073380367"); // 网络照片

    public ChipBean(int id, Uri uri, String peopleName, String peopleInfo) {
        this(id, uri, null, peopleName, peopleInfo);
    }

    public ChipBean(int id, Drawable peopleImage, String peopleName, String peopleInfo) {
        this(id, null, peopleImage, peopleName, peopleInfo);
    }

    public ChipBean(int id, Uri uri, Drawable peopleImage, String peopleName, String peopleInfo) {
        this.id = id;
        this.uri = uri;
        this.peopleImage = peopleImage;
        this.peopleName = peopleName;
        this.peopleInfo = peopleInfo;
    }

    @Override
    public Object getId() {
        return id;
    }

    @Override
    public Uri getAvatarUri() {
        return uri;
    }

    @Override
    public Drawable getAvatarDrawable() {
        return peopleImage;
    }

    @Override
    public String getLabel() {
        return peopleName;
    }

    @Override
    public String getInfo() {
        return peopleInfo;
    }

    @Override
    public String toString() {
        return "ChipBean{" +
                "id=" + id +
//                ", peopleImage=" + peopleImage +
                ", peopleImage=太长了,不展示"   +
                ", peopleName='" + peopleName + '\'' +
                ", peopleInfo='" + peopleInfo + '\'' +
                ", uri=" + uri +
                '}';
    }
}

